<form action="?" method="get">
	<fieldset>
		<legend>Informe o endere&ccedil;o</legend>
		<?php echo $mensagem;?>
		<label title="Uniform Link Locator" for="byUrl">URL:</label>
		<input id="byUrl" name="url" value="<?php echo htmlentities($_GET['url']);?>"/>
		<input type="submit" value="Avaliar" />
	</fieldset>
</form>
<form action="?" method="post">
	<fieldset>
		<legend>Ou poste o seu c&oacute;digo</legend>
		<label title="HyperText Markup Language" for="codHtml">HTML:</label><br />
		<textarea id="codHtml" name="codHtml" rows="10" cols="50"><?php echo htmlentities($codigo);?></textarea>
		<input type="submit" value="Avaliar" />
	</fieldset>
</form>
<?php if($rules !== false){?>
	<?php if($softErr>0){?>
		<?php for($pri = 1; $pri<4;$pri++){?>
			<?php if(count($erros[$pri])>0){?>
				<h2>Erros Prioridade <?php echo $pri;?></h2>
				<table summary="Erros detectados automaticamente por software" class="rel">
					<tr>
						<th>Regra</th>
						<th>Linha</th>
						<th>Coluna</th>
						<th>Descri&ccedil;&atilde;o</th>
					</tr>
					<?php 
					foreach ($erros[$pri] as $erro){
						$rule = $rules->getRule($erro->getIdTextoRegra());
						?>
						<tr>
							<td><?php echo $erro->getIdTextoRegra();?></td>
							<td><?php echo $erro->getLinha()?></td>
							<td><?php echo $erro->getColuna()?></td>
							<td>
								<?php echo $rules->getTextoRegra($erro->getIdTextoRegra());?>
								<?php 
								if(trim($erro->getTagCompleta())!='') echo '<pre>' . str_replace('<', '&lt;', trim($erro->getTagCompleta())) . '&nbsp;</pre>'; 
								?>
								<?php if($rule->getUrl()){
									echo '<a href="' . $rule->getUrl() . '">';
									if($rule->getLabel()){
										echo $rule->getLabel();
									}
									echo '</a>'; 
								}?>
							</td>
						</tr>
						<?php 
					}
					?>
				</table>
			<?php }?>
		<?php }?>
		<?php include('elements/selo-' . $prioridade . '.php');?>
	<?php }else{?>
		<?php include('elements/selo-4.php');?>
	<?php }?>
	<h2>Avalia&ccedil;&atilde;o Humana</h2>
	<p>Para ter certeza absoluta de que a p&aacute;gina est&aacute; acess&iacute;vel &eacute; necess&aacute;rio uma avalia&ccedil;&atilde;o humana para validar os pontos abaixo.</p>
	<?php for($pri = 1; $pri<4;$pri++){?>
		<?php if(count($avisos[$pri])>0){?>
			<h3>Prioridade <?php echo $pri;?></h3>
			<table summary="Pontos que necessitam de avalia&ccedil;&atilde;o humana" class="rel">
				<tr>
					<th>Regra</th>
					<th>Linha</th>
					<th>Coluna</th>
					<th>Descri&ccedil;&atilde;o</th>
				</tr>
				<?php 
				$e18e312 = array();
				foreach ($avisos[$pri] as $erro){
					if($erro->getIdTextoRegra()!='1.8' && $erro->getIdTextoRegra()!='3.12'){
						?>
						<tr>
							<td><?php echo $erro->getIdTextoRegra();?></td>
							<td><?php echo $erro->getLinha()?></td>
							<td><?php echo $erro->getColuna()?></td>
							<td><?php echo $rules->getTextoRegra($erro->getIdTextoRegra());?></td>
						</tr>
						<?php
					}else{
						$k = $erro->getLinha() . ':' . $erro->getColuna() . '; ';
						$e18e312[$k] = $erro; 
					} 
				}
				?>
			</table>
		<?php }?>
	<?php }?>
	<table summary="Regra 1.8 e 3.12" class="rel">
		<tr>
			<th>Descri&ccedil;&atilde;o</th>
			<th class="lc">Linha e Coluna</th>
		</tr>
		<tr>
			<td>
				<p>1.8 <?php echo $rules->getTextoRegra('1.8');?></p>
				<p>3.12 <?php echo $rules->getTextoRegra('3.12');?></p>
			</td>
			<td>
			<?php 
			foreach ($e18e312 as $k => $v){
				echo $v->getLinha() . ':' . $v->getColuna() . '; ';
			}
			?>
			</td>
		</tr>
	</table>
<?php }//tem rules?>